;***********************************************************************
; Elmic Systems ELRASNS Driver Setup File. (NT 4.0)
;***********************************************************************
[Identification]
    OptionType = NetAdapter

;***********************************************************************
;
;***********************************************************************
[PlatformsSupported]
    ISA
    EISA
    "Jazz-Internal Bus"

;***********************************************************************
;
;***********************************************************************
[Options]
   ELRASNS_ISA
   ELRASNS_PCMCIA

;***********************************************************************
;
;***********************************************************************
[FileConstants]
    InfName                 = "OEMELRAS.INF"
    UtilityInf              = "UTILITY.INF"
    ParamInf                = "NCPARAM.INF"
    subroutineinf           = "SUBROUTN.INF"
    SoftwareType            = "driver"
    Exit_Code               = 0
    NetEventDLL             = "%SystemRoot%\System32\netevent.dll"
    IoLogMsgDLL             = "%SystemRoot%\System32\IoLogMsg.dll"
    Manufacturer            = "Elmic Systems"
    ProductMajorVersion     = "4"
    ProductMinorVersion     = "0"
    ProductVersion          = $(ProductMajorVersion)"."$(ProductMinorVersion)
    ProductSoftwareName     = "ELRASNS"
    ProductSoftwareImagePath = "\SystemRoot\System32\drivers\ELRASNSN.SYS"
    NetRuleSoftwareType     = "ELRASNSSys ELRASNSDriver"
    NetRuleSoftwareUse      = $(SoftwareType)
    NetRuleSoftwareBindForm = """ELRASNSSys"" yes no container"
    NetRuleSoftwareClass    = {"ELRASNSDriver basic"}
    NetRuleSoftwareBindable = {"ELRASNSDriver ELRASNSAdapter non exclusive 100"}
    ProductHardwareName     = "ELRASNS"
    NetRuleHardwareBindForm = " yes yes container"
    NetRuleHardwareELRASNSType = "ELRASNS ELRASNSAdapter"
    NetRuleHardwareELRASNSClass = {"ELRASNSAdapter basic"}
    BindableELRASNSTxt      = {"ELRASNSDriver ELRASNSAdapter non exclusive 100"}
    DeviceMap               = "HARDWARE\DEVICEMAP"
    TapiDevices             = "TAPI DEVICES"
    TapiDeviceKey           = $(ProductHardwareName)
    TapiMediaType           = "ISDN"
    ProductKeyName          = $(!NTN_SoftwareBase)"\"$(Manufacturer)"\"+
                              $(ProductSoftwareName)"\CurrentVersion"
    ParamKeyName            = $(!NTN_ServiceBase)"\"$(ProductHardwareName)+
                              "\Parameters"
;'96 11/14
	ProductOpSupport     = 134

;   FIXME - default to dialup line mode = 1 -- leased line = 0
;   In dialup mode we need to write the parameters so RAS/TAPI will bind to us
;   In leased mode we need to write the parameters so NDIS/WAN will bind to us
;   Right now this file only supports dialup mode - leased line changes are needed 

    LineType                = 1
    DebugFlags              = 0
    IO_Addr_List           = {800, 768, 832, 864, 896, 928, 960, 992}
    IRQ_List                = {15, 3, 4, 5, 7, 10, 11,12}
    SwitchType_List         = {16, 1, 2, 4}

;***********************************************************************
; '96 5/27
;***********************************************************************

	NumberOfLines			= 2
	BoardName				= "ELRASNS"
	Port1Name				= "ISDN1"
	Port2Name				= "ISDN2"

	!ELInterruptNumber		= "15"
	!ELIoBaseAddress			= "800"
	!ELSwitchType		        = "16"
	Channel0_SPID			= ""
	Channel0_Phone			= ""
	Channel1_SPID			= ""
	Channel1_Phone			= ""

; '96 6/6
	AfterInit				= 0
;'96 11/5
	ErrorLog				= 1
;'96 11/7
	ELHANDLE				= 0
;'96 11/8
	!ELHardName				= 0

;***********************************************************************
; '96 6/6
;***********************************************************************

; PCMCIA FIXED BEGINE

PCMCIADBKeyName				= $(!NTN_ServiceBase)"\Pcmcia\DataBase"
PCMCIAManufacture			= "ELMIC SYSTEMS, INC."
PCMCIAModel					= "PC-INS/NS1-PS"

; PCMCIA FIXED END


;***********************************************************************
;
;***********************************************************************
[GeneralConstants]
    from                    = ""
    to                      = ""
    ExitCodeOk              = 0
    ExitCodeCancel          = 1
    ExitCodeFatal           = 2
    KeyNull                 = ""
    MAXIMUM_ALLOWED         = 33554432
    RegistryErrorIndex      = NO_ERROR
    KeyProduct              = ""
    KeyParameters           = ""
    KeyElmic                = ""
    TRUE                    = 1
    FALSE                   = 0
    NoTitle                 = 0
    ExitState               = "Active"
    OldVersionExisted       = $(FALSE)
    DriverPath              = $(!STF_NTPATH)\drivers

;***********************************************************************
;
;***********************************************************************
[Date]
    Now                     = {} ? $(!LIBHANDLE) GetSystemDate

;***********************************************************************
;
;***********************************************************************
[Identify]
    Read-Syms Identification
    Set Status      = STATUS_SUCCESSFUL
    Set Identifier  = $(OptionType)
    Set Media       = #("Source Media Descriptions", 1, 1)
    Return $(Status) $(Identifier) $(Media)

;***********************************************************************
;
;***********************************************************************
[ReturnOptions]
    Set Status          = STATUS_FAILED
    Set OptionList      = {}
    Set OptionTextList  = {}
    Set LanguageList    = ^(LanguagesSupported, 1)

    IfContains(i) $($0) in $(LanguageList)
        IfStr(i) $($1) == ""
            GoTo SetOptions
        EndIf
        Set PlatformList = ^(PlatformsSupported, 1)
        IfContains(i) $($1) in $(PlatformList)
            GoTo SetOptions
        Else
            Set Status = STATUS_NOTSUPPORTED
            GoTo ExitReturnOptions
        EndIf
    Else
        Set Status = STATUS_NOLANGUAGE
        GoTo ExitReturnOptions
    EndIf

SetOptions = +
    Set OptionList     = ^(Options, 1)
    Set OptionTextList = ^(OptionsText$($0), 1)
    Set Status         = STATUS_SUCCESSFUL

ExitReturnOptions = +
    Return $(Status) $(OptionList) $(OptionTextList)

;***********************************************************************
;
;***********************************************************************
[InstallOption]
    Set Status   = STATUS_FAILED
    Set Option   = $($1)
    Set SrcDir   = $($2)
    Set RasDir   = $($2)
    Set AddCopy  = $($3)
    Set DoCopy   = $($4)
    Set DoConfig = $($5)
    Set LanguageList = ^(LanguagesSupported, 1)

    Set OptionSub = $(Option)
    Set Option    = "ELRASNS"
;'96 8/28    Set Option    = "Surf2Surf Model II"

    IfContains(i) $($0) NOT-IN $(LanguageList)
        Return STATUS_NOLANGUAGE
    EndIf
    ;
    ; FIXME - make sure this flag is disabled before shipping
    ;
	Set OldDebugControl = $(!DebugOutputControl)
;'96 11/1    Set !DebugOutputControl = 1

    Set-Subst LF = "\n"

    Read-Syms GeneralConstants
    Read-Syms FileConstants
    Read-Syms DialogConstants$(!STF_LANGUAGE)

    IfStr(i) $(!NTN_Origination) == "NCPA"
        Set Continue = $(OK)
    EndIf

    Read-Syms FileConstants$(!STF_LANGUAGE)
    Detect Date
    Set-Title  $(FunctionTitle)$(OptionSub)

    Set to   = Begin
    Set from = Begin
    Set CommonStatus = STATUS_SUCCESSFUL

    EndWait

;***********************************************************************
;
;***********************************************************************
Begin = +
    Set ActivateDetection = FALSE
    IfStr(i) $(!NTN_InstallMode) == deinstall
        Set StartLabel = RemoveAdapter
    Else-IfStr(i) $(!NTN_InstallMode) == Update
        Set StartLabel = UpgradeSoftware
    Else-IfStr(i) $(!NTN_InstallMode) == bind
        Set StartLabel = BindingAdapter
    Else-IfStr(i) $(!NTN_InstallMode) == configure
        Set StartLabel = ConfigureAdapter
;'96 11/5		Set ActivateDetection = TRUE
        Set CommonStatus = STATUS_REBOOT
        IfStr(i) $(ProductKeyName) == $(!NTN_RegBase)
            Debug-Output $(InfName)": Cannot configure the EtherWORKS 3 driver software."
            Shell $(UtilityInf),RegistryErrorString,CANNOT_CONFIGURE_SOFTWARE
            IfInt $($ShellCode) != $(!SHELL_CODE_OK)
                Debug-Output $(InfName)": ShellCode error: cannot get an error string."
                GoTo ShellCodeError
            EndIf
            Set Error = $($R0)
            Set from = end
            Set to = end
            GoTo NonFatalInfo
        EndIf
    Else
        Set StartLabel = InstallAdapter
        Set ActivateDetection = TRUE
        Set OEM_ABANDON_OPTIONS = {}
        Set OEM_ABANDON_SOFTWARE = FALSE
        Set OEM_ABANDON_ON = TRUE
    EndIf

    Debug-Output $(InfName)": =================================================="
    Debug-Output $(InfName)": STF_CWDIR is: "$(!STF_CWDIR)
    Debug-Output $(InfName)": STF_LANGUAGE is: "$(!STF_LANGUAGE)
    Debug-Output $(InfName)": Option is: "$(Option)
    Debug-Output $(InfName)": !STF_NCDETECT  is: "$(!STF_NCDETECT)
    Debug-Output $(InfName)": !STF_NCOPTION  is: "$(!STF_NCOPTION)
    Debug-Output $(InfName)": !STF_NCDETCARD is: "$(!STF_NCDETCARD)
    Debug-Output $(InfName)": !STF_NCDETINFO is: "$(!STF_NCDETINFO)
    Debug-Output $(InfName)": =================================================="

    Set DetectedCard = FALSE
    IfStr(i) $(ActivateDetection) != TRUE
        GoTo $(StartLabel)
    EndIf

    Debug-Output $(InfName)": Calling Param_SetDefaults"
    Shell $(ParamInf) Param_SetDefaults {}

    Shell $(ParamInf) HexListFromDecList $(IO_Addr_List)
    Set IO_Hex_List = $($R0)

    Shell $(ParamInf) HexListFromDecList $(SwitchType_List)
    Set SwitchType_Hex_List = $($R0)

    IfStr(i) $(!STF_NCDETECT) == YES
        IfStr(i) $(!STF_NCOPTION) == $(Option)
           Set DetectedCard = TRUE
           Debug-Output $(InfName)": Setting DetectedCard to TRUE"
        EndIf
    EndIf

    Shell "" DebugConfiguration "After parameter querying"
    Set from = FatalError
    Set to = FatalError
    GoTo $(StartLabel)

;***********************************************************************
;
;***********************************************************************
InstallAdapter = +
; '96 10/28 PCMCIA FIXED BEGINE

	ifstr(i) $(OptionSub) == ELRASNS_PCMCIA
	    OpenRegKey $(!REG_H_LOCAL) "" $(PCMCIADBKeyName) $(MAXIMUM_ALLOWED) PCMCIADBKey
	    ifstr $(PCMCIADBKey) == $(NULL)    
    	    CloseRegKey $(PCMCIADBKey)      
		Debug-Output "PCMCIA service not present"
    	    goto nonfatal
	    else
    	    OpenRegKey $(!REG_H_LOCAL) "" $(PCMCIADBKeyName)"\"$(PCMCIAManufacture) $(MAXIMUM_ALLOWED) PCMCIA$(PCMCIAManufacture)Key
	        ifstr $(PCMCIA$(PCMCIAManufacture)Key) == $(NULL)
    	        debug-output "Adding "$(PCMCIADBKeyName)"\"$(PCMCIAManufacture)
		    CreateRegKey $(PCMCIADBKey) {$(PCMCIAManufacture), 0, 0} "" $(MAXIMUM_ALLOWED) "" PCMCIA$(PCMCIAManufacture)Key
    	    else 
	            debug-output "Manufacture sub key already exist"
    	    endif
	        OpenRegKey $(!REG_H_LOCAL) "" $(PCMCIADBKeyName)"\"$(PCMCIAManufacture)"\"$(PCMCIAModel) $(MAXIMUM_ALLOWED) PCMCIA$(PCMCIAManufacture)$(PCMCIAModel)Key
    	    ifstr $(PCMCIA$(PCMCIAManufacture)$(PCMCIAModel)Key) == $(NULL)
	            debug-output "Adding "$(PCMCIADBKeyName)"\"$(PCMCIAManufacture)"\"$(PCMCIAModel)
    	        CreateRegKey $(PCMCIA$(PCMCIAManufacture)Key) {$(PCMCIAModel), 0, 0} "" $(MAXIMUM_ALLOWED) "" PCMCIA$(PCMCIAManufacture)$(PCMCIAModel)Key
	            SetRegValue $(PCMCIA$(PCMCIAManufacture)$(PCMCIAModel)Key) {Driver, 0, $(!REG_VT_SZ),"ELRASNS"}
;'96 11/15
	            SetRegValue $(PCMCIA$(PCMCIAManufacture)$(PCMCIAModel)Key) {DeviceType, 0, $(!REG_VT_SZ),"NET"}
    	    else
	            debug-output "Device sub key already exist"
    	    endif
	        CloseRegKey $(PCMCIA$(PCMCIAManufacture)$(PCMCIAModel)Key)
    	    CloseRegKey $(PCMCIA$(PCMCIAManufacture)Key)
	        CloseRegKey $(PCMCIADBKey)
    	endif
		Debug-Output $(InfName)": Option = $(OptionSub)(PCMCIA)"
	else
		; '96 10/28 ISA Bus
		Debug-Output $(InfName)": Option = $(OptionSub)(ISA)"
	endif

; '96 6/6 PCMCIA FIXED END

;    Debug-Output ": RegistryPath : "$(!REG_H_LOCAL)"\SYSTEM\CurrentControlSet\Services"
    OpenRegKey $(!REG_H_LOCAL) "" "SYSTEM\CurrentControlSet\Services\ELMIC" $(!REG_KEY_ALL_ACCESS) KeyElmic
    IfStr $(KeyElmic) != $(KeyNull)
        CloseRegKey $(KeyElmic)
        OpenRegKey $(!REG_H_LOCAL) "" "SYSTEM\CurrentControlSet\Services" $(!REG_KEY_SET_VALUE) KeyElmic 
        DeleteRegTree $(KeyElmic) "ELMIC"
        CloseRegKey $(KeyElmic)
    EndIf
    OpenRegKey $(!REG_H_LOCAL) "" $(ProductKeyName) $(MAXIMUM_ALLOWED) KeyProduct
    IfStr $(KeyProduct) != $(KeyNull)
        CloseRegKey $(KeyProduct)
        IfStr(i) !(NTN_RegBase) == $(ProductKeyName)
           Shell $(UtilityInf), VerExistedDlg, $(ProductSoftware$(OptionSub)Title),+
               $(ProductVersion)
           IfInt $($ShellCode) != $(!SHELL_CODE_OK)
               Debug-Output $(InfName)": ShellCode error: cannot get an error string."
               GoTo ShellCodeError
           EndIf
           GoTo end
        Else
           Shell $(UtilityInf), CardExistedDlg
           IfInt $($ShellCode) != $(!SHELL_CODE_OK)
               Debug-Output $(InfName)": ShellCode error: cannot get an error string."
               GoTo ShellCodeError
           EndIf
           IfStr(i) $($R1) != "OK"
               Set CommonStatus = STATUS_USERCANCEL
               GoTo end
           EndIf
           Set OldVersionExisted = $(TRUE)
        EndIf
    EndIf

    Set CurrParamSettings = {}
    IfStr(i) $(DetectedCard) != TRUE
        GoTo AdapterSetup
    EndIf

    StartWait
        Shell $(ParamInf) Param_QueryCard $(!STF_NCDETCARD)
    EndWait

    IfStr(i) $($R0) != STATUS_SUCCESSFUL
        GoTo AdapterSetup
    EndIf

    Set DetectedParams = $($R1)
    Debug-Output $(InfName)": Calling Param_SetDefaults to merge detected params"
    Shell $(ParamInf) Param_SetDefaults $(DetectedParams)
    GoTo AdapterSetup

;***********************************************************************
;
;***********************************************************************
ConfigureAdapter = +
    IfStr $(KeyProduct) == $(KeyNull)
        OpenRegKey $(!REG_H_LOCAL) "" $(!NTN_RegBase) $(MAXIMUM_ALLOWED) KeyProduct
        IfStr $(KeyProduct) == $(KeyNull)
            Set RegistryErrorIndex = CANNOT_FIND_COMPONENT_SERVICE
            Debug-Output $(InfName)": Cannot find component product key"
            GoTo FatalRegistry
        EndIf
    EndIf

    Debug-Output $(InfName)": Shelling to FindService (Configure Adapter)"
    Shell $(UtilityInf) FindService, $(KeyProduct)
    IfInt $($ShellCode) != $(!SHELL_CODE_OK)
        Debug-Output $(InfName)": FindService shell failure"
        GoTo ShellCodeError
    EndIf
    IfStr(i) $($R0) != NO_ERROR
        Debug-Output $(InfName)": FindService Shell error: "$($R0)
        GoTo FatalRegistry
    EndIf

    Set KeyParameters = $($R2)
    CloseRegKey $($R1)
    IfStr $(KeyParameters) == $(KeyNull)
        Set RegistryErrorIndex = CANNOT_FIND_COMPONENT_SERVICE
        Debug-Output $(InfName)": Cannot find component service"
        GoTo FatalRegistry
    EndIf

    Set OldVersionExisted = $(TRUE)
    Set ValueName = ""
    Set ValueData = ""
    Set ValueStr  = ""
    Set ValueList = {}
    EnumRegValue $(KeyParameters) ValueList
    ForListDo $(ValueList)
        Set ValueItem = $($)
        Set ValueName = *($(ValueItem),1)
        Set ValueData = *($(ValueItem),4)
		Debug-Output $(InfName)": "$(ValueName)"="$(ValueData)
        IfStr(i) $(ValueName) == "IoBaseAddress"
            Set !ELIoBaseAddress = $(ValueData)
        Else-IfStr(i) $(ValueName) == "InterruptNumber"
            Set !ELInterruptNumber = $(ValueData)
        Else-IfStr(i) $(ValueName) == "LineType"
            Set LineType = $(ValueData)
        Else-IfStr(i) $(ValueName) == "BusNumber"
            set BusNumber = $(ValueData)
        Else-IfStr(i) $(ValueName) == "BusType"
            set BusType = $(ValueData)
        Else-IfStr(i) $(ValueName) == "Line0.Channel0.Phone"
            set Channel0_Phone = $(ValueData)
        Else-IfStr(i) $(ValueName) == "Line0.Channel0.SPID"
            set Channel0_SPID = $(ValueData)
        Else-IfStr(i) $(ValueName) == "Line0.Channel1.Phone"
            set Channel1_Phone = $(ValueData)
        Else-IfStr(i) $(ValueName) == "Line0.Channel1.SPID"
            set Channel1_SPID = $(ValueData)
        Else-IfStr(i) $(ValueName) == "Line0.SwitchType"
            set !ELSwitchType = $(ValueData)
        EndIf
    EndForListDo
    Shell $(ParamInf) Param_SaveValues
    Set CurrParamSettings = $($R0)

;***********************************************************************
;
;***********************************************************************
AdapterSetup = +
    Shell "" DebugConfiguration "before displaying dialog"
    Set from = AdapterOptions
	Set !ELInterruptNumber = *($(IRQ_List), ~($(IRQ_List),$(!ELInterruptNumber)))
    Set IO_Hex_Value = *($(IO_Hex_List), ~($(IO_Addr_List),$(!ELIoBaseAddress)))
    Set SwitchType_Hex_Value = *($(SwitchType_Hex_List), ~($(SwitchType_List),$(!ELSwitchType)))

    Shell $(ParamInf) Param_ParameterConfidence
    IfStr(i) $($R0) != STATUS_SUCCESSFUL
        Debug-Output $(InfName)": parameter confidence too low to bypass configuration"
        GoTo AdapterOptions
    EndIf
    IfStr(i) $(DetectedCard) == TRUE
        IfStr(i) $(!STF_INSTALL_MODE) != CUSTOM
            GoTo AdapterVerify
        EndIf
    EndIf

;***********************************************************************
;
;***********************************************************************
AdapterOptions = +
;    Read-Syms FileDependentDlg$(!STF_LANGUAGE)
;    UI Start "InputDlg"
;    IfStr(i) $(DLGEVENT) == "CONTINUE"
;        Set InterruptNumber = $(Combo1Out)
;        Set IO_Hex_Value = $(Combo2Out)
;        Set IoBaseAddress = *($(IO_Addr_List), ~($(IO_Hex_List),$(IO_Hex_Value)))
;        ui pop 1
;    Else-IfStr(i) $(DLGEVENT) == "BACK"
;        Set CommonStatus = STATUS_USERCANCEL
;        Debug-Output $(InfName)": Action: exit. Bye."
;        ui pop 1
;        GoTo end
;    Else
;        Debug-Output $(InfName)": Action: unknown. Bye."
;        ui pop 1
;        GoTo end
;    EndIf
;*****************************************************************************

;'96 10/28 ifstr $(OptionSub)追加
	ifstr(i) $(OptionSub) == ELRASNS_ISA
	    IfStr(i) $(!STF_NCDETINFO) == {}
    	    Shell $(UtilityInf),GetBusTypeDialog,$(ProductHardware$(OptionSub)Description) $(BusType) $(BusNumber)
        	ifInt $($ShellCode) != $(!SHELL_CODE_OK)
	            Debug-Output $(InfName)": ShellCode error."
    	        GoTo ShellCodeError
	        EndIf
    	    Set BusType = $($R1)
	        Set BusNumber = $($R2)
    	Else
	        Set BusType = *($(!STF_NCDETINFO),5)
    	    Set BusNumber = *($(!STF_NCDETINFO),6)
	    EndIf

		Debug-Output $(InfName)": Option = $(OptionSub)(ISA)"
	else
		;'96 10/28 PCMICIA
	    set CardType = 1
		set BusType  = 1
		Debug-Output $(InfName)": Option = $(OptionSub)(PCMCIA)"
	endif

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;'96 8/14
;;    Read-Syms SPIDDependentDlg$(!STF_LANGUAGE)
;;    UI Start "InputDlg"
;    IfStr(i) $(DLGEVENT) == "CONTINUE"
;
;       Set SwitchType      = $(Combo1Out)
;		Set Channel0_SPID   = $(Edit1TextOut)
;		Set Channel0_Phone  = $(Edit2TextOut)
;		Set Channel1_SPID   = $(Edit3TextOut)
;		Set Channel1_Phone  = $(Edit4TextOut)
;       ui pop 1
;  Else-IfStr(i) $(DLGEVENT) == "BACK"
;        Set CommonStatus = STATUS_USERCANCEL
;        Debug-Output $(InfName)": Action: exit. Bye."
;        ui pop 1
;        GoTo end
;    Else
;        Debug-Output $(InfName)": Action: unknown. Bye."
;        ui pop 1
;        GoTo end
;    EndIf
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;

;;'96 8/28
;    Read-Syms TelNumberDlg$(!STF_LANGUAGE)
;    UI Start "InputDlg"
;    IfStr(i) $(DLGEVENT) == "CONTINUE"
;		Set Channel0_Phone   = $(EditTextOut)
;       ui pop 1
;  Else-IfStr(i) $(DLGEVENT) == "BACK"
;        Set CommonStatus = STATUS_USERCANCEL
;        Debug-Output $(InfName)": Action: exit. Bye."
;        ui pop 1
;        GoTo end
;    Else
;        Debug-Output $(InfName)": Action: unknown. Bye."
;        ui pop 1
;        GoTo end
;    EndIf


;***********************************************************************
;
;***********************************************************************
AdapterVerify = +
    Shell "" DebugConfiguration "after running dialog"
    IfStr(i) $(DetectedCard) != TRUE
        Shell $(ParamInf) Param_SaveValues
        Set NewParamSettings = $($R0)
        IfStr(i) $(CurrParamSettings) == {}
            Set DiffParamSettings = $(NewParamSettings)
        Else
            Shell $(ParamInf) Param_DiffValues $(CurrParamSettings)
            Set DiffParamSettings = $($R0)
        EndIf
        Debug-Output $(InfName)": Calling Param_VerifyResources"
        Shell $(ParamInf) Param_VerifyResources $(DiffParamSettings)
        IfStr(i) $($R0) == STATUS_SUCCESSFUL
            Debug-Output $(InfName)": Param_VerifyResources succeeded"
            GoTo SkipOptions
        EndIf
    Else
        Set CardVerifyIndex = $(!STF_NCDETCARD)
        Debug-Output $(InfName)": Calling Param_VerifyCard"
        Shell $(ParamInf) Param_VerifyCard $(!STF_NCDETCARD)
        IfStr(i) $($R0) == STATUS_SUCCESSFUL
            Debug-Output $(InfName)": Param_VerifyCard succeeded"
            GoTo SkipOptions
        EndIf
    EndIf

    Set from = AdapterOptions
    Set to = SkipOptions
    Shell $(UtilityInf),RegistryErrorString,VERIFY_WARNING
    IfInt $($ShellCode) != $(!SHELL_CODE_OK)
        Debug-Output $(InfName)": ShellCode error: cannot get an error string."
        GoTo ShellCodeError
    EndIf
    Set Error = $($R0)
    GoTo WarningMsg

;***********************************************************************
;
;***********************************************************************
SkipOptions =+
    IfInt $(OldVersionExisted) == $(TRUE)
        IfStr(i) $(!NTN_InstallMode) == configure
            Debug-Output $(InfName)": SkipOption To WriteParameter"
            GoTo WriteParameters
        EndIf
    EndIf
    StartWait
    IfInt $(OldVersionExisted) == $(FALSE)
        IfStr(i) $(!NTN_InstallMode) == "install"
           IfStr(i) $(DoCopy) == "YES"
              Shell $(UtilityInf), DoAskSource, $(!STF_CWDDIR), $(SrcDir) YES
              IfInt $($ShellCode) != $(!SHELL_CODE_OK)
                  GoTo ShellCodeError
              Else-IfStr(i) $($R0) == STATUS_FAILED
                  Shell $(UtilityInf) RegistryErrorString "ASK_SOURCE_FAIL"
                  IfInt $($ShellCode) != $(!SHELL_CODE_OK)
                      GoTo ShellCodeError
                  EndIf
                  Set Error = $($R0)
                  GoTo FatalError
              Else-IfStr(i) $($R0) == STATUS_USERCANCEL
                  GoTo SuccessfulOption
              EndIf
              Set SrcDir = $($R1)
           EndIf

           Install "Install-Option"
           IfStr(i) $(STF_INSTALL_OUTCOME) != STF_SUCCESS
              Shell $(UtilityInf) RegistryErrorString "UNABLE_COPY_FILE"
              IfInt $($ShellCode) != $(!SHELL_CODE_OK)
                  GoTo ShellCodeError
              EndIf
              Set Error = $($R0)
              GoTo FatalError
          EndIf
        EndIf

        Shell $(UtilityInf), AddSoftwareComponent, $(Manufacturer), +
            $(ProductSoftwareName), +
            $(ProductSoftwareName), +
            $(ProductSoftware$(OptionSub)Title), $(STF_CONTEXTINFNAME), +
            $(ProductSoftwareImagePath), "kernelautostart", "NDIS", {}, "",+
            $(NetEventDLL)
        Set OEM_ABANDON_SOFTWARE = TRUE
        IfInt $($ShellCode) != $(!SHELL_CODE_OK)
            Debug-Output $(InfName)": ShellCode error"
            GoTo ShellCodeError
        EndIf
        Set RegistryErrorIndex = $($R0)
        Set KeyProduct      = $($R1)
        Set SoftNetRulesKey = $($R2)
        CloseRegKey $($R3)
        CloseRegKey $($R4)
        CloseRegKey $($R5)

        IfStr(i) $(RegistryErrorIndex) != NO_ERROR
            EndWait
            Debug-Output $(InfName)": Registry error: add software components"
            CloseRegKey $(KeyProduct)
            CloseRegKey $(SoftNetRulesKey)
            GoTo FatalRegistry
        EndIf

        Set NewValueList = {{SoftwareType,$(NoTitle),$(!REG_VT_SZ),$(SoftwareType)},+
                           {MajorVersion,$(NoTitle),$(!REG_VT_DWORD),$(ProductMajorVersion)},+
                           {MinorVersion,$(NoTitle),$(!REG_VT_DWORD),$(ProductMinorVersion)},+
                           {Title,$(NoTitle),$(!REG_VT_SZ),$(ProductSoftware$(OptionSub)Title)},+
                           {Description,$(NoTitle),$(!REG_VT_SZ),$(ProductSoftware$(OptionSub)Description)},+
                           {ServiceName,$(NoTitle),$(!REG_VT_SZ),$(ProductSoftwareName)},+
                           {InstallDate,$(NoTitle),$(!REG_VT_DWORD),*($(Now),1)}}
        Shell  $(UtilityInf), AddValueList, $(KeyProduct), $(NewValueList)
        IfInt $($ShellCode) != $(!SHELL_CODE_OK)
            Debug-Output $(InfName)": ShellCode error."
            GoTo ShellCodeError
        EndIf
        Set RegistryErrorIndex = $($R0)
        IfStr(i) $(RegistryErrorIndex) != NO_ERROR
            EndWait
            Debug-Output $(InfName)": Registry error: add value list."
            CloseRegKey $(KeyProduct)
            CloseRegKey $(SoftNetRulesKey)
            GoTo FatalRegistry
        EndIf

        Set NewValueList = {{type,$(NoTitle),$(!REG_VT_SZ),$(NetRuleSoftwareType)},+
                            {use,$(NoTitle),$(!REG_VT_SZ),$(NetRuleSoftwareUse)}, +
                            {bindform,$(NoTitle),$(!REG_VT_SZ),$(NetRuleSoftwareBindForm)}, +
                            {class,$(NoTitle),$(!REG_VT_MULTI_SZ),$(NetRuleSoftwareClass)}, +
                            {bindable,$(NoTitle),$(!REG_VT_MULTI_SZ),$(Bindable$(Option)Txt)}, +
                            {InfOption,$(NoTitle),$(!REG_VT_SZ),$(Option)}}
        Shell  $(UtilityInf), AddValueList, $(SoftNetRulesKey), $(NewValueList)
        IfInt $($ShellCode) != $(!SHELL_CODE_OK)
            Debug-Output $(InfName)": ShellCode error."
            GoTo ShellCodeError
        EndIf
        Set RegistryErrorIndex = $($R0)
        CloseRegKey $(KeyProduct)
        CloseRegKey $(SoftNetRulesKey)
        IfStr(i) $(RegistryErrorIndex) != NO_ERROR
            EndWait
            Debug-Output $(InfName)": Resgitry error: add value list."
            GoTo FatalRegistry
        EndIf
    EndIf

    Shell $(UtilityInf), AddHardwareComponent, $(ProductHardwareName),$(STF_CONTEXTINFNAME),$(ProductKeyName)
    IfInt $($R4) != -1
        Set OEM_ABANDON_OPTIONS = >($(OEM_ABANDON_OPTIONS), $(!NTN_SoftwareBase)"\Microsoft\Windows NT\CurrentVersion\NetworkCards\"$($R4))
    EndIf
    IfInt $($ShellCode) != $(!SHELL_CODE_OK)
        Debug-Output $(InfName)": Cannot add hardware component"
        GoTo ShellCodeError
    EndIf
    Set RegistryErrorIndex = $($R0)
    IfStr(i) $(RegistryErrorIndex) != NO_ERROR
        EndWait
        Debug-Output $(InfName)": Registry error: add hardware component"
        CloseRegKey $($R1)
        CloseRegKey $($R2)
        CloseRegKey $($R3)
        GoTo FatalRegistry
    EndIf

    Set KeyParameters = $($R3)
    Set KeyAdapterRules = $($R2)
    Set AdapterNumber = $($R4)
	Set	!ELHardName = $($R5)	;'96 11/8
	Debug-Output $(InfName)": Service=$(!ELHardName)"

    Set NewValueList = {{Manufacturer,$(NoTitle),$(!REG_VT_SZ),$(Manufacturer)},+
                       {Title,$(NoTitle),$(!REG_VT_SZ),"["$($R4)"] "$(ProductHardware$(OptionSub)Title)},+
                       {Description,$(NoTitle),$(!REG_VT_SZ),$(ProductHardware$(OptionSub)Description)},+
                       {ProductName,$(NoTitle),$(!REG_VT_SZ),$(ProductHardwareName)},+
                       {ServiceName,$(NoTitle),$(!REG_VT_SZ),$($R5)},+
                       {InstallDate,$(NoTitle),$(!REG_VT_DWORD),*($(Now),1)}}
    Shell  $(UtilityInf), AddValueList, $($R1), $(NewValueList)
    IfInt $($ShellCode) != $(!SHELL_CODE_OK)
        Debug-Output $(InfName)": ShellCode error"
        GoTo ShellCodeError
    EndIf
    CloseRegKey $($R1)

    Set TempProdName = """"$(ProductHardwareName)$(AdapterNumber)""""
    Set TempBindForm = $(TempProdName)$(NetRuleHardwareBindForm)
    Set NewValueList = {{type,$(NoTitle),$(!REG_VT_SZ),$(NetRuleHardware$(Option)Type)},+
                        {bindform,$(NoTitle),$(!REG_VT_SZ),$(TempBindForm)}, +
                        {class,$(NoTitle),$(!REG_VT_MULTI_SZ),$(NetRuleHardware$(Option)Class)}, +
                        {InfOption,$(NoTitle),$(!REG_VT_SZ),$(Option)}}
    Shell  $(UtilityInf), AddValueList, $(KeyAdapterRules), $(NewValueList)
    IfInt $($ShellCode) != $(!SHELL_CODE_OK)
        Debug-Output $(InfName)": ShellCode error."
        GoTo ShellCodeError
    EndIf
    Set RegistryErrorIndex = $($R0)
    IfStr(i) $(RegistryErrorIndex) != NO_ERROR
        EndWait
        Debug-Output $(InfName)": Resgitry error: add value list."
        CloseRegKey $(KeyParameters)
        CloseRegKey $(KeyAdapterRules)
        GoTo FatalRegistry
    EndIf
    CloseRegKey $(KeyAdapterRules)

    GoTo WriteParameters

;***********************************************************************
;
;***********************************************************************
WriteParameters = +
;;; You need one address entry in the list for each channel on your device.
;;; FIXME - at this point RAS requires there to be one logical line per address
;;; FIXME - so the address (channel) number is ignored and the line number is used
    Set TapiAddressList = {$(AdapterNumber)" 1 0"}
;'96 5/27    IfStr(i) $(Option) == HTDSU42
        Set TapiAddressList = >($(TapiAddressList),$(AdapterNumber)" 2 0")
;'96 5/27    EndIf

;'96 10/28 ifstr $(OptionSub)追加
	IfStr(i) $(!NTN_InstallMode) == configure
	    Set NewValueList = {+
;{InterruptNumber,$(NoTitle),$(!REG_VT_DWORD),$(InterruptNumber)},+
;{RamBaseAddress,$(NoTitle),$(!REG_VT_DWORD),$(IoBaseAddress)},+
;{IoBaseAddress,$(NoTitle),$(!REG_VT_DWORD),$(IoBaseAddress)},+
;{Line0.SwitchType,$(NoTitle),$(!REG_VT_DWORD),$(SwitchType)},+
;{Line0.Channel0.SPID,$(NoTitle),$(!REG_VT_SZ),$(Channel0_SPID)},+
;{Line0.Channel0.Phone,$(NoTitle),$(!REG_VT_SZ),$(Channel0_Phone)},+
;{Line0.Channel1.SPID,$(NoTitle),$(!REG_VT_SZ),$(Channel1_SPID)},+    	
;{Line0.Channel1.Phone,$(NoTitle),$(!REG_VT_SZ),$(Channel1_Phone)},+
						{AfterInit,$(NoTitle),$(!REG_VT_DWORD),$(AfterInit)},+
						{ErrorLog,$(NoTitle),$(!REG_VT_DWORD),$(ErrorLog)}+
                       }
		Debug-Output $(InfName)": WriteParametaer Configure Mode"
	else
		ifstr(i) $(OptionSub) == ELRASNS_PCMCIA
		    set CardType = 1
			set BusType = 1

		    Set NewValueList = {+
;{InterruptNumber,$(NoTitle),$(!REG_VT_DWORD),$(InterruptNumber)},+
;{RamBaseAddress,$(NoTitle),$(!REG_VT_DWORD),$(IoBaseAddress)},+
;{IoBaseAddress,$(NoTitle),$(!REG_VT_DWORD),$(IoBaseAddress)},+
;{Line0.SwitchType,$(NoTitle),$(!REG_VT_DWORD),$(SwitchType)},+
;{Line0.Channel0.SPID,$(NoTitle),$(!REG_VT_SZ),$(Channel0_SPID)},+
;{Line0.Channel0.Phone,$(NoTitle),$(!REG_VT_SZ),$(Channel0_Phone)},+
;{Line0.Channel1.SPID,$(NoTitle),$(!REG_VT_SZ),$(Channel1_SPID)},+    	
;{Line0.Channel1.Phone,$(NoTitle),$(!REG_VT_SZ),$(Channel1_Phone)},+
						{NT351,$(NoTitle),$(!REG_VT_DWORD),1},+
						{Pcmcia,$(NoTitle),$(!REG_VT_DWORD),1},+
						{AddressList,$(NoTitle),$(!REG_VT_MULTI_SZ),$(TapiAddressList)},+
						{BusNumber,$(NoTitle),$(!REG_VT_DWORD),$(BusNumber)},+
						{BusType,$(NoTitle),$(!REG_VT_DWORD),$(BusType)},+
						{CardType,$(NoTitle),$(!REG_VT_DWORD),$(CardType)},+
						{DeviceName,$(NoTitle),$(!REG_VT_SZ),$(ProductHardwareName)},+
						{LineType,$(NoTitle),$(!REG_VT_DWORD),$(LineType)},+
						{MediaType,$(NoTitle),$(!REG_VT_SZ),$(TapiMediaType)},+
						{IoLength,$(NoTitle),$(!REG_VT_DWORD), 16},+
						{NumberOfLines,$(NoTitle),$(!REG_VT_DWORD),$(NumberOfLines)},+
						{BoardName,$(NoTitle),$(!REG_VT_SZ),$(BoardName)},+
						{Port1Name,$(NoTitle),$(!REG_VT_SZ),$(Port1Name)},+
						{Port2Name,$(NoTitle),$(!REG_VT_SZ),$(Port2Name)},+
						{AfterInit,$(NoTitle),$(!REG_VT_DWORD),$(AfterInit)},+
						{ErrorLog,$(NoTitle),$(!REG_VT_DWORD),$(ErrorLog)}+
                       }
			Debug-Output $(InfName)": Option = $(OptionSub)(PCMCIA)"
		else
		    Set NewValueList = {+
;{InterruptNumber,$(NoTitle),$(!REG_VT_DWORD),$(InterruptNumber)},+
;{RamBaseAddress,$(NoTitle),$(!REG_VT_DWORD),$(IoBaseAddress)},+
;{IoBaseAddress,$(NoTitle),$(!REG_VT_DWORD),$(IoBaseAddress)},+
;{Line0.SwitchType,$(NoTitle),$(!REG_VT_DWORD),$(SwitchType)},+
;{Line0.Channel0.SPID,$(NoTitle),$(!REG_VT_SZ),$(Channel0_SPID)},+
;{Line0.Channel0.Phone,$(NoTitle),$(!REG_VT_SZ),$(Channel0_Phone)},+
;{Line0.Channel1.SPID,$(NoTitle),$(!REG_VT_SZ),$(Channel1_SPID)},+    	
;{Line0.Channel1.Phone,$(NoTitle),$(!REG_VT_SZ),$(Channel1_Phone)},+
						{AddressList,$(NoTitle),$(!REG_VT_MULTI_SZ),$(TapiAddressList)},+
						{BusNumber,$(NoTitle),$(!REG_VT_DWORD),$(BusNumber)},+
						{BusType,$(NoTitle),$(!REG_VT_DWORD),$(BusType)},+
						{DeviceName,$(NoTitle),$(!REG_VT_SZ),$(ProductHardwareName)},+
						{LineType,$(NoTitle),$(!REG_VT_DWORD),$(LineType)},+
						{MediaType,$(NoTitle),$(!REG_VT_SZ),$(TapiMediaType)},+
						{NumberOfLines,$(NoTitle),$(!REG_VT_DWORD),$(NumberOfLines)},+
						{BoardName,$(NoTitle),$(!REG_VT_SZ),$(BoardName)},+
						{Port1Name,$(NoTitle),$(!REG_VT_SZ),$(Port1Name)},+
						{Port2Name,$(NoTitle),$(!REG_VT_SZ),$(Port2Name)},+
						{AfterInit,$(NoTitle),$(!REG_VT_DWORD),$(AfterInit)},+
						{ErrorLog,$(NoTitle),$(!REG_VT_DWORD),$(ErrorLog)}+
                       }
			Debug-Output $(InfName)": Option = $(OptionSub)(ISA)"
		endif
	endif
;;;                       {DebugFlags,$(NoTitle),$(!REG_VT_DWORD),$(DebugFlags)},+
    Shell  $(UtilityInf), AddValueList, $(KeyParameters), $(NewValueList)
	Debug-Output $(InfName)": Key = $(KeyParameters)"
    CloseRegKey $(KeyParameters)
    IfInt $($ShellCode) != $(!SHELL_CODE_OK)
        Debug-Output $(InfName)": ShellCode error."
        GoTo ShellCodeError
    EndIf
    Set RegistryErrorIndex = $($R0)
    IfStr(i) $(RegistryErrorIndex) != NO_ERROR
        Debug-Output $(InfName)": Registry error: Add value list"
        GoTo FatalRegistry
    EndIf
    ;
    ; Skip TAPI/RAS setup if already installed.
    ;

;*****************************************************************************
	IfStr(i) $(!NTN_InstallMode) == configure
        OpenRegKey $(!REG_H_LOCAL) "" $(!NTN_RegBase) +
              $(MAXIMUM_ALLOWED) NetworkCardKey
        IfStr(i) $(NetworkCardKey) != $(KeyNull)
            GetRegValue $(NetworkCardKey),"ServiceName", ServiceNameInfo
            Set ServiceName = *($(ServiceNameInfo), 4)
            CloseRegKey $(NetworkCardKey)
        Else
            GoTo FatalRegistry
        EndIf
		Set WriteReg	=	$(!NTN_ServiceBase)"\"$(ServiceName)"\Parameters"
		LoadLibrary "" $(!STF_NTPATH)\ELRASCNF.dll !ELHANDLE
	else
    	Install "Install-DLL"
		Set WriteReg	=	$(!NTN_ServiceBase)"\"$(!ELHardName)"\Parameters"
		LoadLibrary "" $(!STF_NTPATH)\ELRASCNF.dll !ELHANDLE
	endif

	Debug-Output $(InfName)": LibHandle = $(!ELHANDLE)"

	Set-DecToHex  IoBaseStr	= $(!ELIoBaseAddress)
	Set InterruptStr	= $(!ELInterruptNumber)
	Set-DecToHex  SwitchStr	= $(!ELSwitchType)

	Debug-Output $(InfName)": I/O=$(IoBaseStr) IRQ=$(InterruptStr) Sw=$(SwitchStr)"


    Debug-Output $(InfName)": Reg=$(WriteReg)"

    LibraryProcedure ISDNResult, $(!ELHANDLE), +
		ISDN_Configuer,	+
		$(WriteReg), +
		$(IoBaseStr), +
		$(InterruptStr), +
		$(SwitchStr), +
		$(Channel0_Phone), +
		$(Channel0_SPID), +
		$(Channel1_Phone), +
		$(Channel1_SPID)

	Debug-Output $(InfName)": I/O=$(IoBaseStr) IRQ=$(InterruptStr) Sw=$(SwitchStr)"
	Debug-Output $(InfName)": TEL1=$(Channel0_Phone) SPID1=$(Channel0_SPID) TEL2=$(Channel1_Phone) SPID2=$(Channel1_SPID)"

    Set-HexToDec !ELIoBaseAddress		= $(IoBaseStr)
    Set !ELInterruptNumber	= $(InterruptStr)
    Set-HexToDec !ELSwitchType			= $(SwitchStr)

	Debug-Output $(InfName)": I/O=$(!ELIoBaseAddress) IRQ=$(!ELInterruptNumber) Sw=$(!ELSwitchType)"

    Debug-Output $(InfName)": Dialog Result is $(ISDNResult)"

;    Ifstr(i) $(ISDNResult) == Cancel
;    else-Ifstr(i) $(ISDNResult) == Error

    Ifstr(i) $(ISDNResult) != "0"
    	IfStr(i) $(!NTN_InstallMode) == "install"
			Goto SetFailed
		Else-Ifstr(i) $(ISDNResult) == "1"
		    Debug-Output $(InfName)": ELRASCNF Cancel"
    		goto cancel
	    else-Ifstr(i) $(ISDNResult) == "2"
		    Debug-Output $(InfName)": ELRASCNF Fatal"
			GoTo FatalRegistry
    	endif
	Endif

;   FreeLibrary $(!ELHANDLE)
;*****************************************************************************

;'96 11/8  上から移動
	IfStr(i) $(!NTN_InstallMode) == "install"
    	Install "Install-Option2"
        IfStr(i) $(STF_INSTALL_OUTCOME) != STF_SUCCESS
              Shell $(UtilityInf) RegistryErrorString "UNABLE_COPY_FILE"
              IfInt $($ShellCode) != $(!SHELL_CODE_OK)
                  GoTo ShellCodeError
              EndIf
              Set Error = $($R0)
              GoTo FatalError
		EndIf
	Endif

    IfStr(i) $(!NTN_InstallMode) == configure
;'96 11/5        GoTo SuccessfulOption
        GoTo end
    EndIf
    ;
    ; Create the HARDWARE\DEVICEMAP\TAPI DEVICES\ELRASNS key
    ;
    OpenRegKey $(!REG_H_LOCAL) "" "HARDWARE\DEVICEMAP" $(MAXIMUM_ALLOWED) BaseKey
    shell "" HtCreateRegKey $(BaseKey) "TAPI DEVICES\ELRASNS"
    IfStr(i) $($R0) != NO_ERROR
        Debug-Output $(InfName)": Error creating registry key!"
        GoTo FatalRegistry
    EndIf
    Set TapiDeviceKey = $($R1)
    Set NewValueList = {+
                       {Address,$(NoTitle),$(!REG_VT_MULTI_SZ),$(TapiAddressList)},+
                       {"Media Type",$(NoTitle),$(!REG_VT_SZ),$(TapiMediaType)}}
    Shell  $(UtilityInf), AddValueList, $(TapiDeviceKey), $(NewValueList)
    IfInt $($ShellCode) != $(!SHELL_CODE_OK)
        Debug-Output $(InfName)": ShellCode error."
        GoTo ShellCodeError
    EndIf
    Set RegistryErrorIndex = $($R0)
    IfStr(i) $(RegistryErrorIndex) != NO_ERROR
        Debug-Output $(InfName)": Registry error: Add value list"
        GoTo FatalRegistry
    EndIf
    CloseRegKey $(TapiDeviceKey)
    CloseRegKey $(BaseKey)
    ;
    ; if RAS is not installed, then shell ras setup INF file to install RAS
    ; else invoke RAS to allow user to configure RAS for INS64. 
    ;
    Read-Syms InvokeRasDlg$(!STF_LANGUAGE)
    Shell "oemnsvra.inf" CheckRasInstalled
    IfInt $($ShellCode) != $(!SHELL_CODE_OK)
        Debug-Output $(InfName)": Error Shelling the RAS INF file oemnsvra.inf" 
        Shell "subroutn.inf" SetupMessage, $(!STF_LANGUAGE),  +
                "STATUS", $(InvokeRasError)
        IfInt $($ShellCode) != $(!SHELL_CODE_OK)
            GoTo ShellCodeError
        EndIf
        GoTo SuccessfulOption
    EndIf
    Set RasInstalled = $($R0)
    Debug-Output $(InfName)": Is RAS Installed? "$(RasInstalled)
    ;
    ; display a message to the user that RAS setup will now be invoked
    ;
    IfStr(i) $(RasInstalled) == FALSE
        Shell "subroutn.inf" SetupMessage, $(!STF_LANGUAGE), "STATUS", +
                $(InvokeRasSetupMsg)
        IfInt $($ShellCode) != $(!SHELL_CODE_OK)
            GoTo SuccessfulOption
        EndIf
    Else
        Shell "subroutn.inf" SetupMessage, $(!STF_LANGUAGE), "STATUS", +
                $(InvokeRasConfigMsg)
        IfInt $($ShellCode) != $(!SHELL_CODE_OK)
            GoTo SuccessfulOption
        EndIf
    EndIf
	;
	; FIXME - RAS INF will not locate the files if it is spawned here.
	;
;'96 10/25    EndWait
;'96 10/25    GoTo SuccessfulOption

    ;
    ; Set the flags based on whether this is an IDW installation
    ;
    IfStr(i) $(!STF_IDW) == TRUE
        Set AddCopy  = NO
        Set DoCopy   = NO
        Set DoConfig = NO
    Else
        Set AddCopy  = YES
        Set DoCopy   = YES
        Set DoConfig = YES
    EndIf
    ;
    ; change the global install mode flag to configure if RAS is already installed
    ;
;'96 11/14
	    Debug-Output "OEMSETNT.INF: before - NTN_InstallMode = "$(!NTN_InstallMode)
	    set SaveNTN_InstallMode = $(!NTN_InstallMode)
;'96 10/25 ***********************************************************************
	    ifstr(i) $(RasInstalled) == TRUE
	         set !NTN_InstallMode = configure
	    else
	        set !NTN_InstallMode = install
	    endif
	    Debug-Output "OEMSETNT.INF: after - NTN_InstallMode = "$(!NTN_InstallMode)
	    set SaveSTF_SRCDIR_OVERRIDE = $(!STF_SRCDIR_OVERRIDE)
	    set !STF_SRCDIR_OVERRIDE = ""
	    Debug-Output "OEMSETNT.INF: Shelling to oemnsvra.inf InstallOption with parameters:"
	    Debug-Output "                  STF_LANGUAGE = "$(!STF_LANGUAGE)
	    Debug-Output "                  SrcDir = "$(SrcDir)
	    Debug-Output "                  AddCopy = "$(AddCopy)
	    Debug-Output "                  DoCopy = "$(DoCopy)
	    Debug-Output "                  DoConfig = "$(DoConfig)
	    Shell "oemnsvra.inf" InstallOption $(!STF_LANGUAGE) "RAS" $(SrcDir) $(AddCopy) $(DoCopy) $(DoConfig)
	    set !NTN_InstallMode = $(SaveNTN_InstallMode)
	    set !STF_SRCDIR_OVERRIDE = $(SaveSTF_SRCDIR_OVERRIDE)
	    ifstr(i) $(!NTN_InstallMode) == "install"
            set iSearch = 1
        nextnci = +
            Shell $(UtilityInf), FindNextNetworkCard, $(ProductHardwareName), $(iSearch)
            set KeyNetcard = $($R0)
            set iSearch = $($R1)
            Debug-Output "OemNadEp.Inf: FindNextNetworkCard "$(KeyNetcard)","$(iSearch)
            Ifstr $(KeyNetcard) != $(KeyNull)
                Debug-Output "OemNadEp.Inf: Setting OperationsSupport value"
                SetRegValue $(KeyNetcard) {OperationsSupport,$(NoTitle),$(!REG_VT_DWORD),$(ProductOpSupport)}
                CloseRegKey $(KeyNetcard)
                Goto nextnci
            Endif
        endif
	    Ifint $($ShellCode) != $(!SHELL_CODE_OK)
	        Debug-Output "OEMNADDI.INF: Error Shelling the RAS INF file oemnsvra.inf"
	        Shell "subroutn.inf" SetupMessage, $(!STF_LANGUAGE), "STATUS",  +
	    	  $(InvokeRasError)
	        ifint $($ShellCode) != $(!SHELL_CODE_OK)
	    	Goto ShellCodeError
	        endif
			GoTo SuccessfulOption
	    Endif
skipRAS = +
		GoTo SuccessfulOption
    else-Ifstr(i) $(Result) == Cancel
	    goto Cancel
    else-Ifstr(i) $(Result) == Error
	    goto FatalError

;***********************************************************************
;    IfStr(i) $(RasInstalled) == TRUE
;           Set SaveNTN_InstallMode = $(!NTN_InstallMode)
;            Set !NTN_InstallMode = configure
;    EndIf
;    ;
;    ; now invoke RAS setup to do the right thing
;    ;
;    Shell "oemnsvra.inf" InstallOption $(!STF_LANGUAGE) "RAS" $(RasDir) $(AddCopy) $(DoCopy) $(DoConfig)
;    ;
;    ; restore the global instal mode flag if it was changed
;    ;
;    IfStr(i) $(RasInstalled) == TRUE
;            Set !NTN_InstallMode = $(SaveNTN_InstallMode)
;    EndIf
;    IfInt $($ShellCode) != $(!SHELL_CODE_OK)
;        Debug-Output $(InfName)": Error Shelling the RAS INF file oemnsvra.inf" 
;        Shell "subroutn.inf" SetupMessage, $(!STF_LANGUAGE), "STATUS",  +
;                $(InvokeRasError)
;        IfInt $($ShellCode) != $(!SHELL_CODE_OK)
;            GoTo ShellCodeError
;        EndIf
;        GoTo SuccessfulOption
;    EndIf
;
;    EndWait
;    GoTo SuccessfulOption
;
;***********************************************************************
;
;***********************************************************************
BindingAdapter =+
    Set Error = "Binding: Sorry, not yet implemented."
    GoTo FatalError

;***********************************************************************
;
;***********************************************************************
RemoveAdapter = +
    OpenRegKey $(!REG_H_LOCAL) "" "SYSTEM\CurrentControlSet\Services\ELMIC" $(!REG_KEY_ALL_ACCESS) KeyElmic
    IfStr $(KeyElmic) != $(KeyNull)
        CloseRegKey $(KeyElmic)
        OpenRegKey $(!REG_H_LOCAL) "" "SYSTEM\CurrentControlSet\Services" $(!REG_KEY_SET_VALUE) KeyElmic 
        DeleteRegTree $(KeyElmic) "ELMIC"
        CloseRegKey $(KeyElmic)
    EndIf
    IfStr(i) $(ProductKeyName) == $(!NTN_RegBase)
        Shell $(UtilityInf), RemoveSoftwareComponent, $(Manufacturer), +
            $(ProductSoftwareName)
        IfInt $($ShellCode) != $(!SHELL_CODE_OK)
            Debug-Output $(InfName)": ShellCode error"
            GoTo ShellCodeError
        EndIf
        Set RegistryErrorIndex = $($R0)
        IfStr(i) $(RegistryErrorIndex) != NO_ERROR
            GoTo FatalRegistry
        EndIf
    Else
        Shell $(UtilityInf), RemoveHardwareComponent, $(Manufacturer), +
            $(ProductSoftwareName), $(!NTN_RegBase)
        IfInt $($ShellCode) != $(!SHELL_CODE_OK)
            Debug-Output $(InfName)": ShellCode error"
            GoTo ShellCodeError
        EndIf
        Set RegistryErrorIndex = $($R0)
        IfStr(i) $(RegistryErrorIndex) != NO_ERROR
            GoTo FatalRegistry
        EndIf
    EndIf
    GoTo end

;***********************************************************************
;
;***********************************************************************
UpgradeSoftware = +
    IfStr(i) $(ProductKeyName) == $(!NTN_RegBase)
        OpenRegKey $(!REG_H_LOCAL) "" $(ProductKeyName) $(MAXIMUM_ALLOWED) KeyProduct
        IfStr $(KeyProduct) != $(KeyNull)
            GetRegValue $(KeyProduct),"MajorVersion", VersionInfo
            Set Version = *($(VersionInfo), 4)
            Shell $(UtilityInf), GetInfFileNameFromRegistry, $(KeyProduct)
            IfInt $($ShellCode) != $(!SHELL_CODE_OK)
                Debug-Output $(InfName)": ShellCode error"
                GoTo ShellCodeError
            EndIf
            Set !UG_Filename = $($R0)
            IfStr(i) $(!UG_Filename) != ""
                install "Install-Update"
                IfStr(i) $(STF_INSTALL_OUTCOME) != STF_SUCCESS
                    GoTo FatalError
                EndIf
            EndIf
            SetRegValue $(KeyProduct) {MajorVersion,$(NoTitle),$(!REG_VT_SZ),$(ProductMajorVersion)}
            SetRegValue $(KeyProduct) {MinorVersion,$(NoTitle),$(!REG_VT_SZ),$(ProductMinorVersion)}
            IfInt $(Version) != $(ProductVersion)
            EndIf
            CloseRegKey $(KeyProduct)
        Else
            GoTo FatalRegistry
        EndIf
    Else
        OpenRegKey $(!REG_H_LOCAL) "" $(!NTN_RegBase) +
              $(MAXIMUM_ALLOWED) NetworkCardKey
        IfStr(i) $(NetworkCardKey) != $(KeyNull)
            GetRegValue $(NetworkCardKey),"ServiceName", ServiceNameInfo
            Set ServiceName = *($(ServiceNameInfo), 4)
            OpenRegKey $(NetworkCardKey) "" "NetRules" +
                $(MAXIMUM_ALLOWED) NetRuleKey
            IfStr(i) $(NetRuleKey) != $(KeyNull)
            Else
                GoTo FatalRegistry
            EndIf
            CloseRegKey $(NetRules)
            CloseRegKey $(NetworkCardKey)
        Else
            GoTo FatalRegistry
        EndIf
        OpenRegKey $(!REG_H_LOCAL) "" +
              $(!NTN_ServiceBase)"\"$(ServiceName) +
              $(MAXIMUM_ALLOWED) ServiceKey
        IfStr(i) $(ServiceKey) != $(KeyNull)
            CloseRegKey $(ServiceKey)
        Else
            GoTo FatalRegistry
        EndIf
    EndIf
    GoTo end

;***********************************************************************
;
;***********************************************************************
SuccessfulOption = +
    set CommonStatus = STATUS_SUCCESSFUL	;'96 10/25
    GoTo end

;***********************************************************************
;
;***********************************************************************
Abandon = +
    ForListDo $(OEM_ABANDON_OPTIONS)
        Shell $(UtilityInf), RemoveHardwareComponent, $(Manufacturer), +
            $(ProductSoftwareName), $($)
        IfInt $($ShellCode) != $(!SHELL_CODE_OK)
            Debug-Output $(InfName)": ShellCode error"
            GoTo ShellCodeError
        EndIf
        Set RegistryErrorIndex = $($R0)
        IfStr(i) $(RegistryErrorIndex) != NO_ERROR
            GoTo FatalRegistry
        EndIf
    EndForListDo
    IfStr(i) $(OEM_ABANDON_SOFTWARE) == TRUE
        Shell $(UtilityInf), RemoveSoftwareComponent, $(Manufacturer), +
            $(ProductSoftwareName), FALSE
        IfInt $($ShellCode) != $(!SHELL_CODE_OK)
            Debug-Output $(InfName)": ShellCode error"
            GoTo ShellCodeError
        EndIf
        Set RegistryErrorIndex = $($R0)
        IfStr(i) $(RegistryErrorIndex) != NO_ERROR
            GoTo FatalRegistry
        EndIf
    EndIf
    GoTo end

;***********************************************************************
;
;***********************************************************************
WarningMsg = +
    Shell $(subroutineinf) SetupMessage, $(!STF_LANGUAGE), "WARNING", $(Error)
    IfInt $($ShellCode) != $(!SHELL_CODE_OK)
        GoTo ShellCodeError
    EndIf
    IfStr(i) $($R1) == "OK"
        GoTo $(to)
    Else-IfStr(i) $($R1) == "CANCEL"
        GoTo $(from)
    EndIf
    GoTo end

;***********************************************************************
;
;***********************************************************************
NonFatalInfo = +
    Set Severity = STATUS
    Set CommonStatus = STATUS_USERCANCEL
    IfStr(i) $(Error) == ""
        Set Severity = NONFATAL
        Shell $(UtilityInf) RegistryErrorString "SETUP_FAIL"
        IfInt $($ShellCode) != $(!SHELL_CODE_OK)
            GoTo ShellCodeError
        EndIf
        Set Error = $($R0)
    EndIf
    Shell $(subroutineinf) SetupMessage, $(!STF_LANGUAGE), $(Severity), $(Error)
    IfInt $($ShellCode) != $(!SHELL_CODE_OK)
        GoTo ShellCodeError
    EndIf
    IfStr(i) $($R1) == "OK"
        GoTo $(from)
    EndIf
    GoTo end

;***********************************************************************
;
;***********************************************************************
FatalRegistry = +
    Shell $(UtilityInf) RegistryErrorString $(RegistryErrorIndex)
    IfInt $($ShellCode) != $(!SHELL_CODE_OK)
        GoTo ShellCodeError
    EndIf
    Set Error = $($R0)
    GoTo FatalError

;***********************************************************************
;
;***********************************************************************
FatalDetect = +
    Shell $(UtilityInf),RegistryErrorString,CANNOT_DETECT
    IfInt $($ShellCode) != $(!SHELL_CODE_OK)
        Debug-Output $(InfName)": ShellCode error: cannot get an error string."
        GoTo ShellCodeError
    EndIf
    Set Error = $($R0)
    GoTo FatalError

;***********************************************************************
;
;***********************************************************************
FatalError = +
    IfStr(i) $(Error) == ""
        Shell $(UtilityInf) RegistryErrorString "SETUP_FAIL"
        IfInt $($ShellCode) != $(!SHELL_CODE_OK)
            GoTo ShellCodeError
        EndIf
        Set Error = $($R0)
    EndIf
    Shell $(subroutineinf) SetupMessage, $(!STF_LANGUAGE), "FATAL", $(Error)
    IfInt $($ShellCode) != $(!SHELL_CODE_OK)
        GoTo ShellCodeError
    EndIf
    GoTo SetFailed

;***********************************************************************
;
;***********************************************************************
ShellCodeError = +
    Set DlgType      = "MessageBox"
    Set STF_MB_TITLE = $(ShellCodeErrorTitle)
    Set STF_MB_TEXT  = $(ShellCodeErrorText)
    Set STF_MB_TYPE  = 1
    Set STF_MB_ICON  = 3
    Set STF_MB_DEF   = 1
    UI Start "Error Message"
    GoTo SetFailed

;***********************************************************************
;
;***********************************************************************
SetFailed = +
    Set CommonStatus = STATUS_FAILED
    IfStr(i) $(OEM_ABANDON_ON) == TRUE
        Set OEM_ABANDON_ON = FALSE
        GoTo Abandon
    EndIf
    GoTo end

;'96 10/25
Cancel = +
	set CommonStatus = STATUS_USERCANCEL
	goto end

;***********************************************************************
;
;***********************************************************************
end = +
    Set !DebugOutputControl = $(OldDebugControl)
    Return $(CommonStatus)

;***********************************************************************
;
;***********************************************************************
[HtCreateRegKey]
    Debug-Output $(InfName)": Entering [HtCreateRegKey]"
    Set ECR_Result          = NO_ERROR
    Set ECR_BaseKeyHandle   = $($0)
    Set ECR_NewPath         = $($1)
    Set KeyNull             = ""
    Set MAXIMUM_ALLOWED     = 33554432

    Debug-Output $(InfName)": HtCreateRegKey - ECR_BaseKeyHandle = "$(ECR_BaseKeyHandle)
    Debug-Output $(InfName)":                  ECR_NewPath       = "$(ECR_NewPath)
    Debug-Output $(InfName)":                  MAXIMUM_ALLOWED   = "$(MAXIMUM_ALLOWED)
    Debug-Output $(InfName)":                  KeyNull           = "$(KeyNull)

    OpenRegKey $(ECR_BaseKeyHandle) "" $(ECR_NewPath) $(MAXIMUM_ALLOWED) +
               ECR_BaseKey
    Debug-Output $(InfName)": ECR_BaseKey = "$(ECR_BaseKey)
    Debug-Output $(InfName)":     OpenRegKey returned "$($R0)
    IfStr $(ECR_BaseKey) == $(KeyNull)
        Debug-Output $(InfName)": ECR_BaseKey == KeyNull"
    Else
        Debug-Output $(InfName)": ECR_BaseKey != KeyNull"
        Set ECR_KeyHandle = $(ECR_BaseKey)
        GoTo  ECR_Return
    EndIf

    Set ECR_TmpPath = ""
    Split-String $(ECR_NewPath) "\" ECR_PList
    Debug-Output $(InfName)": ECR_PList = "$(ECR_PList)
    ForListDo $(ECR_PList)
        IfStr(i) $($) != "\"
            IfInt $(#) == 1
                Set ECR_TmpPath = $($)
            Else
                Set ECR_TmpPath = $(ECR_TmpPath)"\"$($)
            EndIf
            Debug-Output $(InfName)": Determining if "$(ECR_TmpPath)" exists"
            OpenRegKey $(ECR_BaseKeyHandle) "" $(ECR_TmpPath) $(MAXIMUM_ALLOWED) ECR_BaseKey
            IfStr $(ECR_BaseKey) == $(KeyNull)
                Debug-Output $(InfName)": Creating "$(ECR_TmpPath)
                CreateRegKey $(ECR_BaseKeyHandle)  {$(ECR_TmpPath),0,GenericClass} "" $(MAXIMUM_ALLOWED) "" ECR_KeyHandle
                IfStr(i) $(ECR_KeyHandle) == $(KeyNull)
                    Set ECR_Result = $($R0)
                    GoTo ECR_Return
                EndIf
            EndIf
        EndIf
    EndForListDo
ECR_Return = +
    Return $(ECR_Result) $(ECR_KeyHandle)

;***********************************************************************
;
;***********************************************************************
[DebugConfiguration]
    Debug-Output $(!p:InfName)": **CONFIGURATION STATE: "$($0)
    Debug-Output $(!p:InfName)": InterruptNumber is "$(!p:InterruptNumber)
    Debug-Output $(!p:InfName)": IoBaseAddress  is "$(!p:IoBaseAddress)
    Return

;***********************************************************************
;
;***********************************************************************
[Install-Option]
    Set STF_VITAL = ""
    IfStr(i) $(AddCopy) == "YES"
;       AddSectionFilesToCopyList Files-$(OptionSub) $(SrcDir) $(!STF_WINDOWSSYSPATH)\drivers
;	   AddSectionFilesToCopyList Files-DLL $(SrcDir) $(!STF_WINDOWSSYSPATH)
    EndIf
    IfStr(i) $(DoCopy) == "YES"
       Set !STF_NCPA_FLUSH_COPYLIST = TRUE
;       CopyFilesInCopyList
    EndIf
    Exit

;***********************************************************************
; '96 11/8
;***********************************************************************
[Install-Option2]
    Set STF_VITAL = ""
    IfStr(i) $(AddCopy) == "YES"
        AddSectionFilesToCopyList Files-$(OptionSub) $(SrcDir) $(!STF_WINDOWSSYSPATH)\drivers
	   AddSectionFilesToCopyList Files-DLL $(SrcDir) $(!STF_WINDOWSSYSPATH)
    EndIf
    IfStr(i) $(DoCopy) == "YES"
       Set !STF_NCPA_FLUSH_COPYLIST = TRUE
       CopyFilesInCopyList
    EndIf
    Exit

;***********************************************************************
; '96 11/13
;***********************************************************************
[Install-DLL]
    Set STF_VITAL = ""
	AddSectionFilesToCopyList Files-DLL $(SrcDir) $(!STF_WINDOWSSYSPATH)
	Set !STF_NCPA_FLUSH_COPYLIST = TRUE
	CopyFilesInCopyList


;***********************************************************************
;
;***********************************************************************
[Install-Update]
   Set STF_VITAL        = ""
   Set STF_OVERWRITE    = "VERIFYSOURCEOLDER"
   AddSectionFilesToCopyList Files-$(OptionSub) $(SrcDir) $(!STF_WINDOWSSYSPATH)\drivers
   AddSectionFilesToCopyList Files-DLL $(SrcDir) $(!STF_WINDOWSSYSPATH)
   AddSectionFilesToCopyList Files-Inf $(SrcDir) $(!STF_WINDOWSSYSPATH)
   Set !STF_NCPA_FLUSH_COPYLIST = TRUE
   CopyFilesInCopyList
   Exit

;***********************************************************************
;
;***********************************************************************
[Source Media Descriptions]
    1  = ;"OEM Disk (RAS)" , TAGFILE = disk1
;    1  = "Windows NT Setup Disk #1" , TAGFILE = ELRASNSN.SYS

;***********************************************************************
;
;***********************************************************************
[ProductType]
    STF_PRODUCT         = Winnt
    STF_PLATFORM        = I386

;***********************************************************************
;
;***********************************************************************
[Files-Inf]
    1, oemsetnt.inf, SIZE=63542, RENAME=$(!UG_Filename)

;***********************************************************************
;'96 11/8
;***********************************************************************
[Files-DLL]
    1, ELRASCNF.DLL, SIZE=32256

;***********************************************************************
;
;***********************************************************************
[Files-ELRASNS_PCMCIA]
    1, ELRASNSN.SYS, SIZE=447520

;***********************************************************************
;
;***********************************************************************
[Files-ELRASNS_ISA]
    1, ELRASNSN.SYS, SIZE=447520

;***********************************************************************
;
;***********************************************************************
[LanguagesSupported]
    ENG

;***********************************************************************
;
;***********************************************************************
[OptionsTextENG]
    ELRASNS_ISA		 = "Elmic Systems Surf2Surf Model II ISA (4.0)"
    ELRASNS_PCMCIA   = "Elmic Systems Surf2Surf Model II PCMCIA (4.0)"

;***********************************************************************
;
;***********************************************************************
[FileConstantsENG]
    ProCaption          = "Windows NT Setup"
    ProCancel           = "Cancel"
    ProCancelMsg        = "Windows NT Networking is not correctly installed.  "+
                          "Are you sure you want to cancel copying files?"
    ProCancelCap        = "Network Setup Message"
    ProText1            = "Copying:"
    ProText2            = "To:"

    FunctionTitleELRASNS_PCMCIA                = "Surf2Surf Model II PCMCIA Card Setup"
    ProductSoftwareELRASNS_PCMCIADescription   = "Surf2Surf Model II PCMCIA RAS Driver"
    ProductHardwareELRASNS_PCMCIADescription   = "Surf2Surf Model II PCMCIA"
    ProductSoftwareELRASNS_PCMCIATitle         = "Surf2Surf Model II PCMCIA RAS Driver"
    ProductHardwareELRASNS_PCMCIATitle         = "Surf2Surf Model II PCMCIA Adapter"

    FunctionTitleELRASNS_ISA                = "Surf2Surf Model II ISA Card Setup"
    ProductSoftwareELRASNS_ISADescription   = "Surf2Surf Model II ISA RAS Driver"
    ProductHardwareELRASNS_ISADescription   = "Surf2Surf Model II ISA"
    ProductSoftwareELRASNS_ISATitle         = "Surf2Surf Model II ISA RAS Driver"
    ProductHardwareELRASNS_ISATitle         = "Surf2Surf Model II ISA Adapter"

    ShellCodeErrorTitle                 = "Error: "$(FunctionTitle)$(OptionSub))
    ShellCodeErrorText                  = "Shell Code Error."

;***********************************************************************
;
;***********************************************************************
[DialogConstantsENG]
    Help          		= "ﾍﾙﾌﾟ(&H)"
    Exit                = "ｷｬﾝｾﾙ"
    OK                  = "OK"
    HelpContext         = ""
    Continue            = "続行"
    Cancel              = "ｷｬﾝｾﾙ"

;***********************************************************************
;
;***********************************************************************
[FileDependentDlgENG]
    OK	     	 	  	= "OK"
    Cancel       	 	= "ｷｬﾝｾﾙ"
    Help          		= "ﾍﾙﾌﾟ(&H)"
	Label1 				= "IRQ ﾚﾍﾞﾙ(&I):"
	Label2 				= "I/O ﾎﾟｰﾄ ｱﾄﾞﾚｽ(&P):"
    DlgType             = "RadioCombination"
    DlgTemplate         = "NE2000"
;'96 8/29    Caption             = $(FunctionTitle)$(Option)
    Caption             = "Surf2Surf Model II"
    Combo1List          = $(IRQ_List)
    Combo1Out           = $(InterruptNumber)
    Combo2List          = $(IO_Hex_List)
    Combo2Out           = $(IO_Hex_Value)
    ComboListItemsIn    = {Combo1List, Combo2List}
    ComboListItemsOut   = {Combo1Out, Combo2Out}
    EditTextIn          = ""
    EditTextLim         = ""
    CBOptionsGreyed     = {}
    NotifyFields        = {NO, NO}
;    HelpContext         = $(!IDH_DB_OEMNADN2_INS)

;***********************************************************************
;
;***********************************************************************
[SPIDDependentDlgENG]
    Combo1Label  		= "&Switch Type:"
    Edit1Label          = "Channel 1 Phone Number:"
    Edit2Label          = "Channel 1 SPID:"
    Edit3Label          = "Channel 2 Phone Number:"
    Edit4Label          = "Channel 2 SPID:"
    DlgType             = "Combination"
    DlgTemplate         = "NE2000"
;'96 8/29    Caption             = $(FunctionTitle)$(Option)
    Caption             = "Surf2Surf Model II"
    Edit1TextLim         = 32
    Edit1TextIn          = ""
    Edit1Focus           = "ALL"
    Edit2TextLim         = 32
    Edit2TextIn          = ""
    Edit2Focus           = "ALL"
    Edit3TextLim         = 32
    Edit3TextIn          = ""
    Edit3Focus           = "ALL"
    Edit4TextLim         = 32
    Edit4TextIn          = ""
    Edit4Focus           = "ALL"

    Combo1List          = $(SwitchType_List)
    Combo1Out           = $(SwitchType)
    ComboListItemsIn    = {Combo1List}
    ComboListItemsOut   = {Combo1Out}
    CBOptionsGreyed     = {}
    NotifyFields        = {NO, NO}
;    HelpContext         = $(!IDH_DB_OEMNADN2_INS)

;'96 8/28
[TelNumberDlgENG]
    Caption        = "自局電話番号"
;'96 8/29    Caption        = "Surf2Surf Model II"
    Continue       = "OK"
    Cancel         = "ｷｬﾝｾﾙ"
    Help           = "ﾍﾙﾌﾟ(&H)"
    DlgType        = "Edit"
;    DlgTemplate    = "DISKETTE"
	DlgTemplate = "NETWORK_NUMBER"
;    DlgText        = "自局電話番号を入力してください。"
    Edit1Label     = "自局電話番号(&T):"
    EditTextIn     = $(Channel0_Phone)
    EditTextLim   = 60
    EditFocus      = "ALL"

;***********************************************************************
;
;***********************************************************************
[InvokeRasDlgENG]
	InvokeRasSetupMsg   = "Elmic Systems Surf2Surf Model IIのセットアップが終了しました。"+
    					  "リモートアクセスサービス(RAS)がインストールされます。"+
    					  "Surf2Surf Model II(ELRASNS)のポートの追加及び設定を行ってください。"

	InvokeRasConfigMsg  = "Elmic Systems Surf2Surf Model IIのセットアップが終了しました。"+
						  "リモートアクセスサービス(RAS)が開始されます。"+
				    	  "Surf2Surf Model II(ELRASNS)のポートの追加及び設定を行ってください。"

	InvokeRasError      = "Elmic Systens Surf2Surf Modell IIのセットアップで、RASセットアップ"+
						  "INFファイル(OEMNSVRA.INF)の呼び出し中に、エラーが発生しました。"+
						  "System32ディレクトリに正しいINFファイルがあることを確認してください。"

